package com.juyu.miliao.api.dao.mysql;

import com.juyu.miliao.api.domain.QuestionBillInfo;
import org.apache.ibatis.session.SqlSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;

/**
 * 偷听问题账单信息
 *
 * @author xuanqicheng
 * @create 2018-20-4:33 PM
 */
@Repository
public class QuestionBillInfoDao {

    @Resource
    private SqlSession sqlSession;

    public void createQuestionBill(QuestionBillInfo questionBillInfo) {
        sqlSession.insert("createQuestionBill",questionBillInfo);
    }

    public QuestionBillInfo selectQuestionBillById(Long questionId) {
        return sqlSession.selectOne("selectQuestionBillById",questionId);
    }

    public void updateInfo(String sqlKey,QuestionBillInfo questionBillInfo) {
        sqlSession.update(sqlKey,questionBillInfo);
    }

}
